package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘远望
 * Date: 2025-03-22
 * Time: 9:49
 */
interface Typec{
    void openDeviceT();
    void closeDeviceT();
}
//usb接口
interface Usb extends Typec{
    void openDeviceU();
    void closeDeviceU();
}
//鼠标类实现usb接口
class Mouse implements Usb,Typec{


    public void click(){
        System.out.println("鼠标点击");
    }
    @Override
    public void openDeviceT() {
        System.out.println("typec打开鼠标");
    }
    @Override
    public void closeDeviceT() {
        System.out.println("typec关闭鼠标");
    }
    @Override
    public void openDeviceU() {
        System.out.println("usb打开鼠标");
    }
    @Override
    public void closeDeviceU() {
        System.out.println("usb关闭鼠标");
    }
}
/*//键盘类实现usb接口
class KeyBoard implements Usb,Typec{

    public void input(){
        System.out.println("键盘输入");
    }

    @Override
    public void openDeviceT() {

    }

    @Override
    public void closeDeviceT() {

    }

    @Override
    public void openDeviceU() {

    }

    @Override
    public void closeDeviceU() {

    }
}*/
public class Test {
    public static void main(String[] args) {
            /*Mouse mouse = new Mouse();
            mouse.closeDevice();
            mouse.click();
            mouse.closeDevice();
            KeyBoard keyBoard = new KeyBoard();
            keyBoard.openDevice();
            keyBoard.input();
            keyBoard.closeDevice();*/
    }
}
